package other.model02;

public class Client {
	public static void main(String[] args) {
		//这是一个单例注册表
		BeanFactory beanFactory = BeanFactory.getInstance();
		
		//获取实例1
		Student student1 = (Student) beanFactory
				.getBean(Student.class.getName());
		//获取实例2
		Student student2 = (Student) beanFactory
				.getBean(Student.class.getName());
		
		//比较获取到的两个实例
		System.out.println(student1.hashCode());
		System.out.println(student2.hashCode());
	}
}
